<include file="top"/>
<style>

.floor-title{width:1200px;height:40px;line-height:40px;margin:0 auto;margin-top:10px;border-bottom:2px solid #666666;}
.floor-title span{display:block;float:left;}
.floor{width:1200px;height:550px;margin:0 auto;margin-top:10px;padding:2px;}
.floor_left{width:200px;float:left}
.floor_center{margin-left:2px;width:810px;float:left}
.floor_right{border:1px solid #dedede;border-top:2px solid #99cc00;width:193px;height:553px;float:left;margin-left:-7px;margin-top:-14px}
.floor_right_title{padding:10px;text-align:center;font-size:15px;border-bottom:1px dashed #dedede;}
.floor_hot{width:190px;height:80px;border-bottom:1px dashed #dedede}
.floor_hot span{float:left}
.hot_title{height:34px;width:90px;overflow:hidden;margin-left:10px}
.renqi{margin-left:10px;color:#99cc00}

.goods{width:200px;height:270px;border:1px solid #dedede;margin-left:-1px;margin-top:-1px;float:left;}
.goods span{display:block;width:200px;margin:0 auto;margin-top:5px;text-align:center;color:#666666;}
.goods span img{width:180px;height:180px;}

#price{text-align:left;color:#E4393C;font-size:14px;font-family:'微软雅黑';font-weight:bold;margin-left:15px;}
.tui-goods{width:1200px;margin:0 auto;margin-top:15px}
.tui-right{width:200px;float:right}

/*tab*/
.testtab{float:left;width:990px;border:1px solid  #ccc;}
.tabtitle{line-height:35px;height:35px;border-bottom:2px solid #317ee7;}
.tabtitle li{float:left;width:246px;text-align:center;border-left:1px solid #ccc;background:#eee;}
.tabtitle li.cur{color:#fff;background:#317ee7;}
#tabcon{height:220px;padding:10px;margin-top:5px;}
#tabcon ul{float:left;width:170px;margin-left:20px;}
#tabcon ul img{width:160px;max-height:160px}

/*最新成交*/
#quotation{padding:10px;width:180px;margin-top:5px;height:267px;margin:0 auto;overflow:hidden;}
#quotation li{height:70px;padding-bottom:20px;border-bottom:1px dashed #dddddd}
#quotation li .a-r{text-align:right;}
#quotation li span{display:block;padding:3px;float:left}
.order_uname{color:#317ee7}
#quotation img{width:60px}
</style>
<link type="text/css" href="__TMPL__/img/index.css" rel="stylesheet">
<script type="text/javascript" src="__APP__/statics/js/tab.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#testtab2").tab({
		tabId:"#tabtag2",tabTag:"li",conId:"#tabcon",conTag:"div",act:"mouseover",effact: "scrollx",dft:0
	});
});
</script>

<div class="tui-goods">
	<div class="testtab" id="testtab2">
    	<div id="tabtag2" class="tabtitle" style="">
        	<ul>
            	<li class="cur" style="margin-left:-1px">热卖商品</li>
                <li>特价促销</li>
                <li>人气排行</li>
                <li style="width:249px">新品上架</li>
            </ul>
        </div>
        <div id="tabcon">
        	<div>
<volist name="goods_hot" id="goods_hot">
            	<ul>
				    <li><a href="__APP__/item/{$goods_hot.goods_id}.html"><img alt="{$goods_hot.goods_name}" src="__APP__/{$goods_hot.m_pic}"></a></li>
					<li style="max-height:38px;overflow:hidden"><a href="__APP__/item/{$goods_hot.goods_id}.html">{$goods_hot.goods_name}</a></li>
					<li id="price" style="margin-left:0px">￥{$goods_hot.price}</li>
                </ul>
</volist>
            </div>

            <div>
<volist name="goods_coup" id="goods_coup">
            	<ul>
				    <li><a href="__APP__/item/{$goods_coup.goods_id}.html"><img alt="{$goods_coup.goods_name}" src="__APP__/{$goods_coup.m_pic}"></a></li>
					<li style="max-height:38px;overflow:hidden"><a href="__APP__/item/{$goods_coup.goods_id}.html">{$goods_coup.goods_name}</a></li>
					<li id="price" style="margin-left:0px">￥{$goods_coup.price}</li>
                </ul>
</volist>
            </div>

            <div>
<volist name="goods_rec" id="goods_rec">
            	<ul>
				    <li><a href="__APP__/item/{$goods_rec.goods_id}.html"><img alt="{$goods_rec.goods_name}" src="__APP__/{$goods_rec.m_pic}"></a></li>
					<li style="max-height:38px;overflow:hidden"><a href="__APP__/item/{$goods_rec.goods_id}.html">{$goods_rec.goods_name}</a></li>
					<li id="price" style="margin-left:0px">￥{$goods_rec.price}</li>
                </ul>
</volist>
            </div>

            <div>
<volist name="goods_new" id="goods_new">
            	<ul>
				    <li><a href="__APP__/item/{$goods_new.goods_id}.html"><img alt="{$goods_new.goods_name}" src="__APP__/{$goods_new.m_pic}"></a></li>
					<li style="max-height:38px;overflow:hidden"><a href="__APP__/item/{$goods_new.goods_id}.html">{$goods_new.goods_name}</a></li>
					<li id="price" style="margin-left:0px">￥{$goods_new.price}</li>
                </ul>
</volist>
            </div>
        </div>
    </div>

	<div class="tui-right">{$goods_hot_right.content}</div>
</div>


<div style="clear:both"></div>
<!--1F-->
<div class="floor-title">
    <span><img src="__TMPL__/img/1f.jpg"/></span>
	<span style="font-family:'微软雅黑';font-size:20px;font-weight:bold;margin-left:20px;">{$title_ad.index_title1}</span>
	<span style="float:right;color:#0066FF;margin-right:10px">{$ad_title[0].content}</span>
</div>
<div class="floor">
   <div class="floor_left">
     <div>{$ad_left[0].content}</div>
	 <div>{$ad_left[1].content}</div>
   </div>

   <div class="floor_center">
		   <volist name="goods" id="goods" offset="0" length='8'>
		   <div class="goods">
		   <if condition="$goods.m_pic eq ''">
			  <span><a href="__GROUP__/Goods/item.html?id={$goods.goods_id}"><img src="__APP__/statics/no-good.jpg"></a></span>
			<else/>
			  <span><a href="__GROUP__/Goods/item.html?id={$goods.goods_id}"><img alt="{$goods.goods_name}" src="__APP__/{$goods.m_pic}"></a></span>   
		   </if>
			  <span style="padding:10px;width:160px;text-align:left;height:28px;overflow:hidden;"><a href="__GROUP__/Goods/item.html?id={$goods.goods_id}">{$goods.goods_name|substr=0,100}</a></span> 
			  <span id="price">￥{$goods.price}</span> 
<if condition="$goods.uptime gt $nowtime">
			   <div style="position:absolute;z-index:100;width:60px;height:60px;margin-top:-265px;margin-left:140px;"><img src="__APP__/statics/tag_new.png"></div>
</if>
		   </div>
		 </volist>
   </div>

   <div class="floor_right">
      <div class="floor_right_title">热销榜</div>
<volist name="hot" id="hot">
	  <div class="floor_hot">
          <span style="padding:3px;background:#99cc00;color:#fff;font-size:25px;">{$i}</span>
		  <span><a href="__GROUP__/Goods/item.html?id={$hot.goods_id}"><img alt="{$hot.goods_name}" src="__APP__/{$hot.s_pic}" width="60"></a>
		  </span>
		  <span>
              <dl id="price" style="margin-left:5px">￥{$hot.price}</dl>
			  <dl class="hot_title"><a href="__GROUP__/Goods/item.html?id={$hot.goods_id}">{$hot.goods_name}</a></dl>
			  <dl class="renqi">人气：{$hot.view_count}</dl>
		  </span>
	  </div>
</volist>
   </div>
</div>
<!--1F end-->

<!--2F-->
<div class="floor-title">
    <span><img src="__TMPL__/img/2f.jpg"/></span>
	<span style="font-family:'微软雅黑';font-size:20px;font-weight:bold;margin-left:20px;">{$title_ad.index_title2}</span>
	<span style="float:right;color:#0066FF;margin-right:10px">{$ad_title[1].content}</span>
</div>
<div class="floor">
   <div class="floor_left">
     <div>{$ad_left[2].content}</div>
	 <div>{$ad_left[3].content}</div>
   </div>

   <div class="floor_center">
		   <volist name="goods2" id="goods2" offset="0" length='8'>
		   <div class="goods">
		   <if condition="$goods2.m_pic eq ''">
			  <span><a href="__GROUP__/Goods/item.html?id={$goods2.goods_id}"><img src="__APP__/statics/no-good.jpg"></a></span>
			<else/>
			  <span><a href="__GROUP__/Goods/item.html?id={$goods2.goods_id}"><img alt="{$goods2.goods_name}" src="__APP__/{$goods2.m_pic}"></a></span>   
		   </if>
			  <span style="padding:10px;width:160px;text-align:left;height:30px;overflow:hidden;"><a href="__GROUP__/Goods/item.html?id={$goods2.goods_id}">{$goods2.goods_name|substr=0,100}</a></span> 
			  <span id="price">￥{$goods2.price}</span> 
<if condition="$goods2.uptime gt $nowtime">
			   <div style="position:absolute;z-index:100;width:60px;height:60px;margin-top:-265px;margin-left:140px;"><img src="__APP__/statics/tag_new.png"></div>
</if>
		   </div>
		 </volist>
         </div>
	<div class="floor_right">
      <div class="floor_right_title">热销榜</div>
<volist name="hot1" id="hot1">
	  <div class="floor_hot">
          <span style="padding:3px;background:#99cc00;color:#fff;font-size:25px;">{$i}</span>
		  <span><a href="__GROUP__/Goods/item.html?id={$hot1.goods_id}"><img alt="{$hot1.goods_name}" src="__APP__/{$hot1.s_pic}" width="60"></a>
		  </span>
		  <span>
              <dl id="price" style="margin-left:5px">￥{$hot1.price}</dl>
			  <dl class="hot_title"><a href="__GROUP__/Goods/item.html?id={$hot1.goods_id}">{$hot1.goods_name}</a></dl>
			  <dl class="renqi">人气：{$hot1.view_count}</dl>
		  </span>
	  </div>
</volist>
   </div>
   
   </div>
<!--2F end-->

<!--3F-->
<div class="floor-title">
    <span><img src="__TMPL__/img/2f.jpg"/></span>
	<span style="font-family:'微软雅黑';font-size:20px;font-weight:bold;margin-left:20px;">{$title_ad.index_title3}</span>
	<span style="float:right;color:#0066FF;margin-right:10px">{$ad_title[2].content}</span>
</div>
<div class="floor" style="height:100%">
        <div class="floor_left" style="height:340px;border:1px solid #dddddd">
		       <div class="floor_right_title">TA刚购买了…</div>
			   <div>
				<div id="quotation">
					<ul>
<volist name="order_list" id="order_list">
						<li>
						     <dl class="order_uname"><font color="#cd010e">{$order_list.create_time|date="H:i",###}</font>&nbsp;&nbsp;{$order_list.uname}<font color="#606060">购买了:</font></dl>
							 <dl>
							     <span style="border:1px solid #dddddd;text-align:center;width:62px"><img src="__APP__/{$order_list.s_pic}"></span>
								 <span style="width:100px;float:right;">
								     <span style="max-height:36px;overflow:hidden"><a href="__APP__/item/{$order_list.goods_id}.html">{$order_list.goods_name}</a></span>
									 <span id="price" style="margin-left:0px;">￥{$order_list.price}</span>
								</span>
							 <dl>
						</li>
</volist>
					</ul>
				</div>
				</div>
		</div>

		<div class="slide_screen" style="margin-top:0px;float:right">
			<ul class="clearfix">
				<li class="liA">
					<div class="window clearfix">
						<div class="piece">
							{$ad_bot1[0].content}
						</div>
						<div class="piece">
							{$ad_bot1[1].content}
						</div>

				</li>
				<li class="liB">
					<div class="window clearfix">
						<div class="piece">
							{$ad_bot2[0].content}
						</div>
						<div class="piece">
							{$ad_bot2[1].content}
						</div>

					</div>
				</li>
				<li class="liC">
					<div class="window clearfix">
						<div class="piece">
							{$ad_bot2[2].content}
						</div>
						<div class="piece">
							{$ad_bot2[3].content}
						</div>

					</div>
				</li>
				<li class="liD">
					<div class="window clearfix">
						<div class="piece">
							{$ad_bot3[0].content}   
						</div>
						<div class="piece">
							{$ad_bot3[1].content}
						</div>        

					</div>
				</li>
			</ul>
<!--
			<ul class="libtn">
				<li _index="1"></li>
				<li _index="2"></li>
				<li _index="3"></li>
			</ul>
-->
		</div>
</div>
<!--3F end-->
<div style="clear:both"></div>
<include file="Public:footer"/>
<script type="text/javascript">
(function() {
	var LI_WIDTH = [583, 199, 199, 198], 
		LI_DOM = [$('.slide_screen li.liA'), $('.slide_screen li.liB'), $('.slide_screen li.liC'), $('.slide_screen li.liD')], 
		LI_BTN = $('.slide_screen .libtn'),
		COUNT =  2, SPEED = 500, DISTIM = 4000, LI_COUNT = 4;
	var cur = 1, next_cur = 2, runid, isclick = true;

	init();
	initEvent();

	runid = setInterval(run, DISTIM);
	function init() {
		LI_BTN.find('li').eq(cur-1).addClass('selected');

		for(var i=0; i<LI_COUNT; i++) {
			LI_DOM[i].find('.window').css({'top':0, 'left':0, 'position':'absolute'});
			LI_DOM[i].find('.window').css('width', LI_WIDTH[i]*COUNT);
		}

	}
	function initEvent() {
		LI_BTN.mouseover(function(ev){
			if(isclick && $(ev.target).attr("_index") !== undefined) {
				isclick = false;
				LI_BTN.find('li').eq(cur-1).removeClass('selected');
				clearInterval(runid);
				runid = null;
				cur = parseInt($(ev.target).attr("_index"));
				next_cur = cur + 1;
				LI_BTN.find('li').eq(cur-1).addClass('selected');
				for(var i=0; i<LI_COUNT; i++) {
					LI_DOM[i].find('.window').stop(true,true).animate({"left": -(cur-1)*LI_WIDTH[i]}, SPEED, function(){
						if(runid===null)runid = setInterval(run, DISTIM);
						isclick = true;
					});
				}
			}
		});
	}
	function run() {
		isclick = false;
		LI_BTN.find('li').eq(cur-1).removeClass('selected');
		if(cur != COUNT){
			for(var i=0; i<LI_COUNT; i++) {
				LI_DOM[i].find('.window').stop(true,true).animate({"left": -(next_cur-1)*LI_WIDTH[i]}, SPEED, function() {
					isclick = true;
				});
			}
			cur++;
			next_cur = cur + 1;
		}
		else {
			for(var i=0; i<LI_COUNT; i++) {
				LI_DOM[i].find('.piece:lt('+(COUNT-1)+')').clone().insertAfter(LI_DOM[i].find('.piece').last());
				LI_DOM[i].find('.piece:lt('+(COUNT-1)+')').remove();
				LI_DOM[i].find('.window').css('left', '0px');

                LI_DOM[i].find('.window').stop(true,true).animate({"left": -LI_WIDTH[i]}, SPEED, function() {
	            	$(this).find('.piece').first().clone().insertAfter($(this).find('.piece').last());
	            	$(this).find('.piece').first().remove();
	            	$(this).css('left', '0px');
	            	isclick = true;
                });
			}
			cur = 1;
			next_cur = cur + 1;
		}
		LI_BTN.find('li').eq(cur-1).addClass('selected');
	}
})();


	var scrtime;
	$("#quotation").hover(function(){
		clearInterval(scrtime);
	
	},function(){
	
	scrtime = setInterval(function(){
		var $ul = $("#quotation ul");
		var liHeight = $ul.find("li:last").height();
		$ul.animate({marginTop : liHeight + 21 + "px"},1000,function(){
		
		$ul.find("li:last").prependTo($ul)
		$ul.find("li:first").hide();
		$ul.css({marginTop:0});
		$ul.find("li:first").fadeIn(1000);
		});
	},4000);
	
	}).trigger("mouseleave");
</script>